

#include "Sort.h"

void TestBubbleSort()
{
	int a[] = { 7,2,9,8,1,3,6,5,7,4 };

	BubbleSort(a, sizeof(a) / sizeof(int));
}


void TestInsertSort()
{
	int a[] = { 7,2,9,8,1,3,6,5,7,4 };

	InsertSort(a, sizeof(a) / sizeof(int));

}


void  TestShellSort()
{
	int a[] = { 7,2,9,8,1,3,6,5,7,4 };

	ShellSort(a, sizeof(a) / sizeof(int));
}

void  TestSelectSort()
{
	int a[] = { 7,2,9,8,1,3,6,5,7,4 };
	//int a[] = { 10,2,6,8 };

	SelectSort(a, sizeof(a) / sizeof(int));
}


void  TestQuickSort()
{
	//int a[] = { 7,2,9,8,1,3,6,5,7,4,4,4 };

	int a[] = { 1,7,7,2,3,4,5,6,7,7,7,8,9,10 };

	//int a[] = { 1,4, 3};



	QuickSort(a, 0, sizeof(a) / sizeof(int) - 1);

	PrintArray(a, sizeof(a) / sizeof(int));
}


void  TestMergeSort()
{
	//int a[] = { 7,2,9,8,1,3,6,5,7,4,4,4 };

	int a[] = { 1,7,7,2,3,4,5,6,7,7,7,8,9,10 };

	//int a[] = { 1,4, 3};



	MergeSort(a, sizeof(a) / sizeof(int));

	PrintArray(a, sizeof(a) / sizeof(int));
}

void TestMergeSortNonR()
{
	int a[] = { 1,7,7,2,3,4,5,6,7,-7,-7,7,7,8,9,10 };

	MergeSortNonR(a, sizeof(a) / sizeof(int));
}

void TestCountSort()
{
	int a[] = { 1,7,7,2,3,4,5,6,7,-7,-7,7,7,8,9,10 };

	CountSort(a, sizeof(a) / sizeof(int));
}




int main()
{
	//TestBubbleSort();

	//TestInsertSort();

	//TestShellSort();

	//TestSelectSort();

	//TestQuickSort();

	//TestMergeSort();

	//TestMergeSortNonR();

	//TestCountSort();

	return 0;
}

